﻿namespace RuoYi.Framework.Extensions;

public static class ListExtensions
{
  /// <summary>
  ///   是否是空集合
  /// </summary>
  /// <typeparam name="TSource">泛型类型</typeparam>
  /// <param name="sources">集合对象</param>
  /// <returns>是否为空集合</returns>
  public static bool IsNullOrEmpty<TSource>(this IEnumerable<TSource> sources)
  {
    return sources == null || !sources.Any();
  }
}
